#! /bin/sh

PROTOC_PATH="protoc/mac/protoc340"

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

test -d java && rm -rf java
test -d pb && rm -rf pb

mkdir java
mkdir pb

OUTFILE="protocol.pb"
test -d ${OUTFILE} && rm -f ${OUTFILE}

$PROTOC_PATH --descriptor_set_out=${OUTFILE} `ls *.proto`

cp ${OUTFILE} ../client/src/protocol/

echo "done"
